//package com.along.sign.controller;
//
//import com.along.sign.service.AppService;
//import com.along.sign.utils.SignUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///*
// * @Author: liujinyi
// * @DateTime: 2025/1/13 15:47
// */
//@RestController
//public class UserController {
//
//    @Autowired
//    private AppService appService;
//
//    @GetMapping("/hello")
//    public String hello() {
//        return "hello";
//    }
//
//    @GetMapping("/test")
//    public String testSign(){
//        String appId = "app1";
//        long timeMillis = System.currentTimeMillis();
//        String appSecret = appService.getAppKey(appId);
//        String sign = SignUtils.signWithHmacSha1(appSecret, appId + "-" + appSecret + "-" + timeMillis);
//        System.out.println("timeMillis = " + timeMillis);
//        System.out.println("sign = " + sign);
//        return sign;
//    }
//}
